﻿using Mt.Site.Core.WorkFlows.Design.DiyForm;
using Mt.Site.Core.WorkFlows.Enum;
using System;
using System.Collections.Generic;

namespace Mt.Site.Core.WorkFlows.Design.Cache
{
    [Serializable]
    public class WorkFlowCacheItem : IWorkFlowCacheItem
    {
        public const string CacheStoreName = "AppWorkFlowCache";

        public Guid WorkFlowId { get; set; }

        public int Order { get; set; }

        public string Name { get; set; }

        public string ShortName { get; set; }

        public bool IsActive { get; set; }

        /// <summary>
        /// 表单ID
        /// </summary>
        public Guid FormId { get; set; }

        public Guid CategeoryId { get; set; }

        public bool IsHaveAttachment { get; set; }

        public bool IsHaveOnlineWord { get; set; }


        public EntrustType EntrustType { get; set; }

        public string Description { get; set; }

        /// <summary>
        /// 文号格式
        /// </summary>
        public string NumberFormat { get; set; }

        /// <summary>
        /// 自动编号的位数
        /// </summary>
        public int DigitNumber { get; set; }

        /// <summary>
        /// 自动编号的当前计数
        /// </summary>
        public int NumberCounting { get; set; }

        public bool ShouldLogWhenDrawback { get; set; }


        public long[] UnitIdList { get; set; }

        public WorkFlowNodeCacheItem[] NodeList { get; set; }

        /// <summary>
        /// 表单
        /// </summary>
        public string FormHtml { get; set; }
        /// <summary>
        /// 表单字段描述
        /// </summary>
        public FormConfigItem[] FormConfig { get; set; }

        /// <summary>
        /// 表单中的自定义列表控件
        /// </summary>
        public Dictionary<string, FormConfigItem[]> FormListCtrlConfig { get; set; }

        public string OptionFunction { get; set; }

        public WorkflowCustomData CustomData { get; set; }
    }
}
